#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>

int main()
{
	double price = 0;
	scanf("%lf", &price);

	if (price >= 5000)
	{
		price = price * 0.6;
	}
	else if (price >= 2000)
	{
		price = price * 0.7;
	}
	else if (price >= 500)
	{
		price = price * 0.8;
	}
	else if (price >= 100)
	{
		price = price * 0.9;
	}
	else
	{
		price = price * 1.0;
	}

	printf("%.1f", price);
	return 0;
}